﻿@using JustMVCTest.Models;
@using System.Collections.Generic;
@using JustMVCTest.Models;
@model List<JustMVCTest.Controllers.ReportController.TopDelaying_Rep>      
<br />
<head>

</head>
<body>
<div id="replogo">
@{
  var RelPathS = System.Configuration.ConfigurationManager.AppSettings["WebDirectory"].ToString();
  var RelPathE = "/JustMVCTest/pics/report.jpg";
  var RelPath = RelPathS + RelPathE;
}
<img src= "@RelPath" alt="Reportlogo" align="left" />
</div>
<table cellpadding="3" align="center" cellspacing="3">
    <tr border="1" bgcolor="#87CEFF" color="#ffffff">
        <td align="center">
            Name
        </td>
        <td width align="center">
            Email
        </td>
        <td align="center">
            Count
        </td>
    </tr>
    @{
        var OddColor = "#DDEEEE";
        var evenColor = "#EEFFFF";
        var Odd = OddColor;
    }
    @{ 
        var num_rows = 1;
        var first_time = true;
        
    }
    @foreach (JustMVCTest.Controllers.ReportController.TopDelaying_Rep po in Model)
    {
        if (num_rows % 18 == 0 && !first_time)
        {
            <tr border="1" bgcolor="#87CEFF" color="#ffffff">
                <td align="center">
                    Name
                </td>
                <td width align="center">
                    Email
                </td>
                <td align="center">
                    Count
                </td>
            </tr>
        }
        else
        {
            <tr border="1" align="center" bgcolor="@Odd">
                <td>@po.Name
                </td>
                <td>@po.Email
                </td>
                <td>@po.Count
                </td>
            </tr>
        }

        if (Odd == OddColor)
        {
            Odd = evenColor;
        }
        else
        {
            Odd = OddColor;
        }
        num_rows++;
        first_time = false;
    }
</table>
</body>